<?php
trait Site{
	public abstract function name();
	public static function show(){
		return 'show---static';
	}
	public function getSiteName(){
		return "九江于志伟";
	}
}
trait Log{
	public function save(){
		return __METHOD__;
	}
}
trait Comment{
	use Site;
	public function save(){
		return __METHOD__;
	}
}

class Topic{
	use Log,Comment{
		Log::save insteadof Comment;
		// Log::save as protected;
		Comment::save as send;
	}
	public function name(){

	}
}

$topic=new Topic();
echo $topic->save();
echo "<br>";
echo $topic->send();
echo "<br>";
echo $topic->getSiteName();
echo "<br>";
echo Topic::show();

//输出
//Log::save
//Comment::save
//九江于志伟
//show---static